﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HR_ctrlUserSearch_Survey.ascx.cs" Inherits="vHCS.Web.MdlHR.Controls.HR_ctrlUserSearch_Survey" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Core.Controls" Namespace="Core.Controls.DataReader" TagPrefix="core" %>
<div class="div6Column" >
    <div class="label"><asp:Label ID="lblEmpCode_L" runat="server" Text="Mã NV" 
            meta:resourcekey="lblEmpCode_LResource1" ></asp:Label></div>
    <div class="control">
        <asp:TextBox ID="txtEmpCode" runat="server" MaxLength="50" Width="80%" 
            CssClass="inputTextUserSearch" onkeypress="KeypreessEnter(this,event)"  meta:resourcekey="txtEmpCodeResource1" ></asp:TextBox>
        <asp:Button ID="btnChooseEmpCode" runat="server" Width="15%" Text="..." 
            OnClientClick="ctrlUserSearch_popupManger.OpenSelectEmployeePopup();return false;" meta:resourcekey="btnChooseEmpCodeResource1" 
             />
    </div>
   
    <div class="label"><asp:Label ID="lblEmpName_L" runat="server" Text="Họ tên" 
            meta:resourcekey="lblEmpName_LResource1"></asp:Label></div>
    <div class="control">
        <asp:TextBox ID="txtEmpName" runat="server" MaxLength="255" Width="80%" 
            CssClass="inputTextUserSearch" onkeypress="KeypreessEnter(this,event)" meta:resourcekey="txtEmpNameResource1"></asp:TextBox>
         <asp:Button ID="btnChooseEmpName" Width="15%" runat="server" Text="..." 
            OnClientClick="ctrlUserSearch_popupManger.OpenSelectEmployeePopup(); return false;" 
            meta:resourcekey="btnChooseEmpNameResource1" />
    </div>
    <div class="label">
        <asp:Label ID="Label3" runat="server" Text="Tên đăng nhập" 
            meta:resourcekey="Label3Resource1"></asp:Label>
    </div>
    <div class="controlLast">
        <asp:RegularExpressionValidator ID="valCheckUsernames" CssClass="validation" runat="server"  Display="Dynamic" ControlToValidate="txtUsernames"
             SetFocusOnError="true" ValidationExpression="((\s)*\w(\w)*;?(\s)*)*" ValidationGroup="Search"
            ErrorMessage="Tên đăng nhập không hợp lệ"></asp:RegularExpressionValidator>
        <asp:TextBox ID="txtUsernames" MaxLength="500" runat="server" Width="99.7%" 
            CssClass="inputText" ToolTip="Nhập nhiều người dùng ngăn cách nhau bởi dấu ';'" onkeypress="KeypreessEnter(this,event)"
            meta:resourcekey="txtUsernamesResource1" />
    </div>
    <div class="divClear"></div>
</div>


<div class="div6Column">
    <div class="label"><asp:Label ID="lblOrgchart_L" runat="server" 
            Text="Cơ cấu tổ chức" meta:resourcekey="lblOrgchart_LResource1" ></asp:Label></div>
    <div class="div5Colum">
        <telerik:RadComboBox ID="cboOrgChart" runat="server"  Width="100.5%" 
            Height="200px" OnClientDropDownOpened="ctrlUserSearch_treeOrgChart.OnClientDropDownOpenedHandler"
                ExpandAnimation-Type="None" OnClientKeyPressing="KeypreessEnter"
            CollapseAnimation-Type="None" meta:resourcekey="cboOrgChartResource1">
                <ItemTemplate>
                    <div class="noneItem" onclick="ctrlUserSearch_treeOrgChart.noneItemClick();">
                        
                    </div>
                    <div class="divTreeOnRadCombo" id="divOrgChart" >
                        <telerik:RadTreeView runat="server" ID="trvOrgChart" Width="100%"    
                            OnClientNodeClicking="ctrlUserSearch_treeOrgChart.nodeClicking"
                             DataFieldID="HierarchyId" DataFieldParentID ="ParentId"  DataSourceID="dtsOrgChart"
                             DataTextField="HierarchyName" DataValueField="HierarchyId" 
                            meta:resourcekey="trvOrgChartResource1" >  
                                                 
                        </telerik:RadTreeView>
                    </div>
                    <div class="divButton">
                        <asp:LinkButton ID="btnCollapseAll" CssClass="treeCollapse" 
                            OnClientClick="treeExpandCollapse.treeCollapseAllNodes(); return false;" 
                            runat="server" meta:resourcekey="btnCollapseAllResource1" Text="Thu nhỏ"></asp:LinkButton>
                        <asp:LinkButton ID="btnExpandAll" CssClass="treeExpand" 
                            OnClientClick="treeExpandCollapse.treeExpandAllNodes(); return false;" 
                            runat="server" meta:resourcekey="btnExpandAllResource1" Text="Mở rộng"></asp:LinkButton>
                    </div>

                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" Value="" 
                        meta:resourcekey="RadComboBoxItemResource1" />                   
                </Items>

<ExpandAnimation Type="None"></ExpandAnimation>

<CollapseAnimation Type="None"></CollapseAnimation>
        </telerik:RadComboBox>
          <core:CoreDataSource ID="dtsOrgChart" runat="server" SelectMethod="FindOrgChart"
                                TypeName="vHCS.HR.Business.HIE_HierarchyCollection" 
                        MaximumRowsParameterName="">
                </core:CoreDataSource>
    </div>
    <div class="divClear"></div>
</div>


<div id="advancedSearch" style="width:100%; display:block" >
    <div class="div6Column">
        <div class="label"><asp:Label ID="lblJobChart_L" runat="server" 
                Text="Cơ cấu nghề nghiệp chuyên môn" meta:resourcekey="lblJobChart_LResource1" ></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboProChart" runat="server"  Width="99%" OnClientKeyPressing="KeypreessEnter"
                Height="200px"  DropDownWidth="500px" 
                AutoPostBack="True" OnClientDropDownOpened="ctrlUserSearch_treeProChart.OnClientDropDownOpenedHandler"
                EmptyMessage="Chọn cơ cấu chuyên môn" ExpandAnimation-Type="None" 
                CollapseAnimation-Type="None" meta:resourcekey="cboProChartResource1">
                <ItemTemplate>
                    <div class="noneItem" onclick="noneItemClickPro()">
                        
                    </div>
                    <div  class="divTreeOnRadCombo" id="divProChart">
                        <telerik:RadTreeView runat="server" ID="trvProChart" Width="100%"  
                            DataFieldID="HierarchyId" DataFieldParentID ="ParentId"  DataSourceID="dtsProChart"
                            DataTextField="HierarchyName" DataValueField="HierarchyId"
                            OnNodeClick="trvProChart_NodeClick"
                             OnClientNodeClicking="ctrlUserSearch_treeProChart.nodeClicking" 
                            meta:resourcekey="trvProChartResource1" >                            
                        </telerik:RadTreeView>
                    </div>
                    <div class="divButton">
                        <asp:LinkButton ID="btnCollapseAll" CssClass="treeCollapse" 
                            OnClientClick="treeProJobChart.treeCollapseAllNodes(); return false;" 
                            runat="server" meta:resourcekey="btnCollapseAllResource2">Thu nhỏ</asp:LinkButton>
                        <asp:LinkButton ID="btnExpandAll" CssClass="treeExpand" 
                            OnClientClick="treeProJobChart.treeExpandAllNodes(); return false;" 
                            runat="server" meta:resourcekey="btnExpandAllResource2">Mở rộng</asp:LinkButton>
                    </div>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" Value="" 
                        meta:resourcekey="RadComboBoxItemResource2" />
                </Items>
                <ExpandAnimation Type="None"></ExpandAnimation>
                <CollapseAnimation Type="None"></CollapseAnimation>
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsProChart" runat="server" SelectMethod="FindProChart"
                    TypeName="vHCS.SYS.Business.HIE_HierarchyCollection" 
                MaximumRowsParameterName="">                   
            </core:CoreDataSource>
        </div>
        <div class="label"><asp:Label ID="Label4" runat="server" Text="Ranking" 
                meta:resourcekey="Label4Resource1" ></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboProRanking" DataSourceID="dtsProRanking"  
                Filter="Contains" AllowCustomText="false" MarkFirstMatch="true"
                DataTextField="Name" DataValueField="Id" Width="100%" runat="server" OnClientKeyPressing="KeypreessEnter"
                meta:resourcekey="cboProRankingResource1">                    
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsProRanking"  runat="server" 
                SelectMethod="GetComboItems"  
                TypeName="vHCS.LS.Business.LS_RankingLevelCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="prefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />                      
                </SelectParameters>
            </core:CoreDataSource>  
        </div>
          <div class="label"><asp:Label ID="Label5" runat="server" Text="Grade" 
                  meta:resourcekey="Label5Resource1" ></asp:Label></div>
        <div class="controlLast">
            <telerik:RadComboBox ID="cboProGrade" Width="100%" DataSourceID="dtsProGrade" 
                runat="server" DataTextField="Name" DataValueField="Id" 
                Filter="Contains" AllowCustomText="false" MarkFirstMatch="true" OnClientKeyPressing="KeypreessEnter"
                meta:resourcekey="cboProGradeResource1" >                  
            </telerik:RadComboBox>
             <core:CoreDataSource ID="dtsProGrade"  runat="server" 
                SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_GradeCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="prefix" DefaultValue="" DbType="String" />  
                    <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" /> 
                    <asp:Parameter Name="getTop" DefaultValue="false" Type="Boolean" />                  
                </SelectParameters>
            </core:CoreDataSource>  
        </div>
        <div class="divClear"></div>
    </div>
    
    <div class="div6Column">
        <div class="label"><asp:Label ID="Label1" runat="server" Text="Cơ cấu nghề nghiệp quản lý" 
                meta:resourcekey="Label1Resource1" ></asp:Label></div>
        <div class="control">
             <telerik:RadComboBox ID="cboMgtChart" runat="server"  Width="99%" 
                 Height="200px" DropDownWidth="500px" OnClientKeyPressing="KeypreessEnter"
                AutoPostBack="True" OnClientDropDownOpened="ctrlUserSearch_treeMgtChart.OnClientDropDownOpenedHandler"
                EmptyMessage="Chọn cơ cấu quản lý" ExpandAnimation-Type="None" 
                 CollapseAnimation-Type="None" meta:resourcekey="cboMgtChartResource1" 
                 >
                <ItemTemplate>
                    <div class="noneItem" id="noneItem"  onclick="noneItemClickMgt()">
                        
                    </div>
                    <div class="divTreeOnRadCombo" id="divMgtChart" >
                        <telerik:RadTreeView runat="server" ID="trvMgtChart" Width="100%" 
                            DataFieldID="HierarchyId" DataFieldParentID ="ParentId"  DataSourceID="dtsMgtChart"
                            DataTextField="HierarchyName" DataValueField="HierarchyId" 
                            OnClientNodeClicking="ctrlUserSearch_treeMgtChart.nodeClicking" 
                            OnNodeClick="trvMgtChart_NodeClick" 
                            meta:resourcekey="trvMgtChartResource1" >                            
                        </telerik:RadTreeView>
                    </div>
                     <div class="divButton">
                        <asp:LinkButton ID="btnCollapseAll" CssClass="treeCollapse" 
                             OnClientClick="treeMgtJobChart.treeCollapseAllNodes(); return false;" 
                             runat="server" meta:resourcekey="btnCollapseAllResource3">Thu nhỏ</asp:LinkButton>
                        <asp:LinkButton ID="btnExpandAll" CssClass="treeExpand" 
                             OnClientClick="treeMgtJobChart.treeExpandAllNodes(); return false;" 
                             runat="server" meta:resourcekey="btnExpandAllResource3">Mở rộng</asp:LinkButton>
                    </div>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" Value="" 
                        meta:resourcekey="RadComboBoxItemResource3" />
                </Items>
                <ExpandAnimation Type="None"></ExpandAnimation>
                <CollapseAnimation Type="None"></CollapseAnimation>
            </telerik:RadComboBox>
             <core:CoreDataSource ID="dtsMgtChart" runat="server" SelectMethod="FindMgtChart"
                    TypeName="vHCS.SYS.Business.HIE_HierarchyCollection" 
                 MaximumRowsParameterName="">                   
            </core:CoreDataSource>
        </div>
         <div class="label"><asp:Label ID="Label2" runat="server" Text="Ranking" 
                 meta:resourcekey="Label2Resource1" ></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboMgtRanking" Width="100%" runat="server" 
                DataSourceID="dtsMgtRanking" DataTextField="Name" DataValueField="Id" 
                Filter="Contains" AllowCustomText="false" MarkFirstMatch="true" OnClientKeyPressing="KeypreessEnter"
                meta:resourcekey="cboMgtRankingResource1" >                      
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsMgtRanking"  runat="server" 
                SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_RankingLevelCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="prefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />                       
                </SelectParameters>
            </core:CoreDataSource> 
            
        </div>
        <div class="label"><asp:Label ID="Label6" runat="server" Text="Grade" 
                meta:resourcekey="Label6Resource1" ></asp:Label></div>
        <div class="controlLast">
            <telerik:RadComboBox ID="cboMgtGrade" Width="100%" runat="server" 
                Filter="Contains" AllowCustomText="false" MarkFirstMatch="true"
                DataSourceID="dtsMgtGrade" DataTextField="Name" DataValueField="Id" 
                meta:resourcekey="cboMgtGradeResource1" OnClientKeyPressing="KeypreessEnter">                    
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsMgtGrade"  runat="server" 
                SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_GradeCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="prefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />                      
                </SelectParameters>
            </core:CoreDataSource> 
            
        </div>
        <div class="divClear"></div>
    </div>
    
    <div class="div6Column">
        <div class="label"><asp:Label ID="lblJobLevel_L" runat="server" Text="Cấp bậc" 
                meta:resourcekey="lblJobLevel_LResource1" ></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboJobLevel" Width="100%"  runat="server"  
                Filter="Contains" MarkFirstMatch="True" AllowCustomText="false"
                DataSourceID="dtsJobLevel" DataTextField="Name" DataValueField="Id" 
                onselectedindexchanged="cboJobLevel_SelectedIndexChanged" OnClientKeyPressing="KeypreessEnter" 
                AutoPostBack="True" meta:resourcekey="cboJobLevelResource1" >            
           </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsJobLevel"  runat="server" SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_JobLevelCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />                     
                </SelectParameters>
            </core:CoreDataSource> 
        </div>
        <div class="label"><asp:Label ID="lblJobTitle_L" runat="server" Text="Chức vụ" 
                meta:resourcekey="lblJobTitle_LResource1"></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboJobTitle" Width="100%" 
                Filter="Contains"  AllowCustomText="false" MarkFirstMatch="true"
                DataSourceID="dtsJobTitle"  runat="server" DataTextField="Name" 
                DataValueField="Id" meta:resourcekey="cboJobTitleResource1" OnClientKeyPressing="KeypreessEnter" >           
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsJobTitle"  runat="server" 
                SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_JobTitleCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="jobLevelId" DefaultValue="0" DbType="Int64" /> 
                    <asp:Parameter Name="jobFamilyId" DefaultValue="0" DbType="Int64" /> 
                    <asp:Parameter Name="jobGroupId" DefaultValue="0" DbType="Int64" /> 
                    <asp:Parameter Name="subGroupId" DefaultValue="0" DbType="Int64" /> 
                    <asp:Parameter Name="prefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="addNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />                  
                </SelectParameters>
            </core:CoreDataSource> 
        </div>
      
      <div class="label"><asp:Label ID="Label7" runat="server" Text="Job Role" ></asp:Label></div>
        <div class="controlLast">
            <telerik:RadComboBox ID="cboJobRole" Width="100%"  
                DataTextField="Name" DataValueField="Id" DataSourceID="dtsJobRole"  
                 AllowCustomText="true"
                HighlightTemplatedItems="true" Filter="Contains" 
                OnClientSelectedIndexChanging="ctrlUserSearch_chkJobRole.OnClientSelectedIndexChanging"
                OnClientLoad="ctrlUserSearch_chkJobRole.OnClientLoad"
                OnClientDropDownClosing="ctrlUserSearch_chkJobRole.OnClientDropDownClosing"     
                OnClientBlur="ctrlUserSearch_chkJobRole.OnClientBlur" 
                OnClientKeyPressing="KeypreessEnter"                                   
                runat="server">    
                <ItemTemplate>
                    <div style="width:100%"  onclick="ctrlUserSearch_chkJobRole.OnClick(this,event);">                   
                        <asp:CheckBox runat="server" ID="chkJobRole"
                         onclick="ctrlUserSearch_chkJobRole.OnClick(this,event);" 
                         Text=""/>
                            <%# DataBinder.Eval(Container, "Text") %>    
                    </div>              
                </ItemTemplate> 
                <FooterTemplate>
                    <div class="divButton">
                        <asp:LinkButton ID="btnSelectAll" OnClientClick="ctrlUserSearch_chkJobRole.SelectAll();return false;" CssClass="selectAll" runat="server">Chọn tất cả</asp:LinkButton>
                        <asp:LinkButton ID="btnUnSelectAll" OnClientClick="ctrlUserSearch_chkJobRole.DeselectAll();return false;" CssClass="deselectAll" runat="server">Bỏ chọn</asp:LinkButton>
                    </div>    
                </FooterTemplate>               
            </telerik:RadComboBox>
           
            
             <core:CoreDataSource ID="dtsJobRole"  runat="server" SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_JobRoleCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="prefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="addNullItem" DefaultValue="false" DbType="Boolean" /> 
                    <asp:Parameter Name="getTop" DefaultValue="false" DbType="Boolean" />                     
                </SelectParameters>
            </core:CoreDataSource> 
            <div style="display:none">           
                <asp:TextBox ID="hdfJobRoles" Text="" runat="server"></asp:TextBox>
            </div>
        </div>
         
        <div class="divClear"></div>
    </div>   

    <div class="div6Column">
        <div class="label"><asp:Label ID="lblEmpType_L" runat="server" 
                Text="Loại nhân viên" meta:resourcekey="lblEmpType_LResource1" ></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboEmpType" Width="100%" runat="server" 
                Filter="Contains" DataSourceID="dtsEmpType" DataTextField="Name"  
                AllowCustomText="false"  MarkFirstMatch="true"
                DataValueField="Id" meta:resourcekey="cboEmpTypeResource1" OnClientKeyPressing="KeypreessEnter">           
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsEmpType"  runat="server" 
                SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_EmpTypeCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />                    
                </SelectParameters>
            </core:CoreDataSource> 
        </div>
        <div class="label"><asp:Label ID="lblContractType_L" runat="server" 
                Text="Loại hợp đồng" meta:resourcekey="lblContractType_LResource1"></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboContractType" Width="100%"  Filter="Contains" 
                AllowCustomText="false"  MarkFirstMatch="true"
                runat="server" DataSourceID="dtsContractType" DataTextField="Name" OnClientKeyPressing="KeypreessEnter"
                DataValueField="Id" meta:resourcekey="cboContractTypeResource1">          
            </telerik:RadComboBox>
             <core:CoreDataSource ID="dtsContractType"  runat="server" 
                SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_ContractTypeCollection" 
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />                      
                </SelectParameters>
            </core:CoreDataSource> 
        </div>
        <div class="label"><asp:Label ID="lblWorkingLocation_L" runat="server" 
                Text="Văn phòng làm việc" meta:resourcekey="lblWorkingLocation_LResource1"></asp:Label></div>
        <div class="controlLast">
            <telerik:RadComboBox ID="cboWorkingLocation" Filter="Contains" 
                AllowCustomText="false" MarkFirstMatch="true" 
                DataSourceID="dtsWorkingLocation" HighlightTemplatedItems="True" Width="100%"  
                runat="server" DataTextField="Name" DataValueField="Id" OnClientKeyPressing="KeypreessEnter" 
                meta:resourcekey="cboWorkingLocationResource1">           
                 <HeaderTemplate>
                    <ul class="comboHeader">
                        <li class="code">
                            <asp:Label ID="Label2" runat="server" Text="Mã" 
                                meta:resourcekey="Label2Resource3" ></asp:Label>
                        </li>
                        <li class="name">
                            <asp:Label ID="Label3" runat="server" Text="Tên" 
                                meta:resourcekey="Label3Resource3" ></asp:Label>
                        </li>
                        <li class="divClear"></li>
                    </ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <ul class="comboItem">
                        <li class="code">
                            <%#DataBinder.Eval(Container.DataItem, "Code")%>
                        </li>
                        <li class="name">
                             <%#DataBinder.Eval(Container.DataItem, "Name")%>
                        </li>
                    </ul>
               </ItemTemplate>          
            </telerik:RadComboBox>
             <core:CoreDataSource ID="dtsWorkingLocation"  runat="server" 
             SelectMethod="GetComboItems" 
                TypeName="vHCS.LS.Business.LS_WorkPlaceCollection"
                MaximumRowsParameterName="">
                <SelectParameters>
                    <asp:Parameter Name="p_strPrefix" DefaultValue="" DbType="String" /> 
                    <asp:Parameter Name="p_bAddNullItem" DefaultValue="true" DbType="Boolean" /> 
                    <asp:Parameter Name="p_bGetTop" DefaultValue="false" DbType="Boolean" />                     
                </SelectParameters>
            </core:CoreDataSource> 
        </div>
        <div class="divClear"></div>
    </div>
    <div class="divClear"></div>
   
    <div class="div6Column">
         <div class="label"><asp:Label ID="lblReportTo_L" runat="server" Text="Báo cáo cho" 
                meta:resourcekey="lblReportTo_LResource1"></asp:Label></div>
        <div class="control">
            <telerik:RadComboBox ID="cboReportTo" Width="100%" MarkFirstMatch="true" 
                HighlightTemplatedItems="True"  DropDownWidth="500px"
                EnableLoadOnDemand="True" OnItemsRequested="RadComboBox_ItemRequested" 
                runat="server" DataSourceID="dtsReportTo" AllowCustomText="false"
                DataTextField="Name" DataValueField="Id" OnClientKeyPressing="KeypreessEnter"  
                meta:resourcekey="cboReportToResource1">            
                 <HeaderTemplate>
                    <ul class="comboHeader">
                        <li class="code">
                            <asp:Label ID="Label2" runat="server" Text="Mã" 
                                meta:resourcekey="Label2Resource2"></asp:Label>
                        </li>
                        <li class="name">
                            <asp:Label ID="Label3" runat="server" Text="Tên" 
                                meta:resourcekey="Label3Resource2" ></asp:Label>
                        </li>
                        <li class="divClear"></li>
                    </ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <ul class="comboItem">
                        <li class="code">
                            <%#DataBinder.Eval(Container.DataItem, "Code")%>
                        </li>
                        <li class="name">
                             <%#DataBinder.Eval(Container.DataItem, "Name")%>
                        </li>
                    </ul>
               </ItemTemplate>   
                <FooterTemplate>
                    <div class="comboFooter">
                        <asp:Label ID="Label4" runat="server" Text="Please enter text to show more items"></asp:Label>
                    </div>                   
               </FooterTemplate>       
            </telerik:RadComboBox>
            <core:CoreDataSource ID="dtsReportTo"  runat="server" SelectMethod="GetComboItems" 
                    TypeName="vHCS.SYS.Business.SYS_UsersCollection" 
                    MaximumRowsParameterName="">
                    <SelectParameters>
                        <asp:Parameter Name="prefix" DefaultValue="" DbType="String" /> 
                        <asp:Parameter Name="addNullItem" DefaultValue="true" Type="Boolean" /> 
                        <asp:Parameter Name="getTop" DefaultValue="true" Type="Boolean" />                  
                    </SelectParameters>
            </core:CoreDataSource> 
        </div>     
        <div class="label"><asp:Label ID="lblBarCode_L" runat="server" Text="Barcode" 
                meta:resourcekey="lblBarCode_LResource1"></asp:Label></div>
        <div class="control"><asp:TextBox ID="txtBarcode" runat="server" Width="80%" 
                CssClass="inputTextUserSearch" meta:resourcekey="txtBarcodeResource1" onkeypress="KeypreessEnter(this,event)"></asp:TextBox>
                 <asp:Button ID="btnChooseBarCode" Width="15%" runat="server" Text="..." 
                    OnClientClick="ctrlUserSearch_popupManger.OpenSelectEmployeePopup(); return false;"  />
        </div>
          
           <div class="divClear"></div>
    </div>
    <div class="div6Column">
        <div class="label"><asp:Label ID="lblTerminationStatus_L" runat="server" 
                Text="Tình trạng" meta:resourcekey="lblTerminationStatus_LResource1" ></asp:Label></div>
     
        <div class="div5Colum">
           <asp:RadioButtonList   ID="rbtTerminationStatus" runat="server" 
                RepeatDirection="Horizontal" meta:resourcekey="rbtTerminationStatusResource1" onkeypress="KeypreessEnter(this,event)">
               <asp:ListItem Value="2" Selected="True" Text="Hiện diện" meta:resourcekey="ListItemResource1"></asp:ListItem>
               <asp:ListItem Value="1" Text="Nghỉ việc" meta:resourcekey="ListItemResource2"></asp:ListItem>
               <asp:ListItem Value="3" Text="Tất cả" 
                   meta:resourcekey="ListItemResource3"></asp:ListItem></asp:RadioButtonList>
        
        </div>    
    </div>
    <div class="divClear"></div>

</div>
<div class="divClear"></div>

<div class="divAdvanced">
     <div class="sep">
           
    </div>
    <div class="label">
        <asp:HyperLink ID="btnExpand" runat="server"  
            onclick='return collapser.showAdvance("1");' ToolTip="Click here to expand" 
            CssClass="divCollapsed" meta:resourcekey="btnExpandResource1" 
            Text="Mở rộng"></asp:HyperLink>
        <asp:HyperLink ID="btnCollapse" runat="server"  
            onclick='return collapser.hideAdvance("1");' ToolTip="Click here to collapse"  
            CssClass="divExpanded" meta:resourcekey="btnCollapseResource1" 
            Text="Thu nhỏ"></asp:HyperLink>
        <div style="display:none">
            <asp:TextBox ID="hdfAdvanceStatus" runat="server" Text="0" 
                meta:resourcekey="hdfAdvanceStatusResource1"></asp:TextBox>
        </div>
        
    </div>
    
    <div class="divClear"></div>
</div>
<div class="divClear"></div>
<asp:HiddenField ID="hdfEmployeeId" runat="server" />
<div style="display:none">
    <asp:Button ID="btnEmpChanged" runat="server" OnClick="EmployeeChanged" 
        meta:resourcekey="btnEmpChangedResource1" />
</div>

<telerik:RadAjaxManager ID="ajaxManager" runat="server" 
    meta:resourcekey="ajaxManagerResource1" onajaxrequest="ajxManager_AjaxRequest">
    <AjaxSettings >
        <telerik:AjaxSetting AjaxControlID="cboJobLevel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl  ControlID="cboJobTitle" LoadingPanelID="ajaxLoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="cboMgtChart">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl  ControlID="cboJobTitle" LoadingPanelID="ajaxLoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cboProChart">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl  ControlID="cboJobTitle" LoadingPanelID="ajaxLoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="ajaxManager">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl  ControlID="cboJobTitle" LoadingPanelID="ajaxLoadingPanel"/>
               
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="ajaxLoadingPanel" runat="server" 
    meta:resourcekey="ajaxLoadingPanelResource1">
</telerik:RadAjaxLoadingPanel>


<telerik:RadCodeBlock  ID="radCodeBlock" runat="server">
    <script type="text/javascript">
        var ctrlUserSearch_treeOrgChart = new TreeViewInRadCombo("<%=cboOrgChart.ClientID %>", "trvOrgChart");
        var ctrlUserSearch_treeMgtChart = new TreeViewInRadCombo("<%=cboMgtChart.ClientID %>", "trvMgtChart");
        var ctrlUserSearch_treeProChart = new TreeViewInRadCombo("<%=cboProChart.ClientID %>", "trvProChart");
        var ctrlUserSearch_chkJobRole = new CheckBoxInRadCombo("<%=cboJobRole.ClientID %>", "<%=hdfJobRoles.ClientID %>");

        var collapser = new CollapseExpand("<%=btnExpand.ClientID %>", "<%=btnCollapse.ClientID %>", "advancedSearch", "<%=hdfAdvanceStatus.ClientID %>");

        //Set trang thái hiển thị vùng thông tin mở rộng
        collapser.onInit();

        var ctrlUserSearch_popupManger = new UserSearchFormPopupManager();
        function UserSearchFormPopupManager() {
            this.OpenSelectEmployeePopup = function () {
             
                var txtCode = document.getElementById("<%=txtEmpCode.ClientID %>");
                var txtEmpName = document.getElementById("<%=txtEmpName.ClientID %>");
                var txtBarCode = document.getElementById("<%=txtBarcode.ClientID %>");
                new PopUpManager().Open("../MdlHR/Controls/HR_PopEmpSelecting.aspx?IsPopup=1&mChoice=0&Barcode=" + encodeURI(txtBarCode.value) + "&EmpName=" + encodeURI(txtEmpName.value) + "&EmpCode=" + encodeURI(txtCode.value));
            }
        }

        ///Xử lý sự kiện chọn nhân viên
        function ReturnEmployee(args) {

            if (args != null && args.length > 0) {
                var hdfEmpId = document.getElementById("<%=hdfEmployeeId.ClientID %>");

                //Nếu thay đổi mã nhân viên
                if (hdfEmpId.value != args[0]) {
                    hdfEmpId.value = args[0];
                    var btnChanged = document.getElementById("<%=btnEmpChanged.ClientID %>");

                    btnChanged.click();
                }
            }

        }
        var treeExpandCollapse = new TreeExpandCollapse("<%=trvOrgChartClientId%>");
        var treeProJobChart = new TreeExpandCollapse("<%=trvProChartClientId %>");
        var treeMgtJobChart = new TreeExpandCollapse("<%=trvMgtChartClientId %>");

        function noneItemClickMgt() {
            var comboBox = $find("<%=cboMgtChart.ClientID %>");
            comboBox.trackChanges();
            comboBox.get_items().getItem(0).set_text("");
            comboBox.get_items().getItem(0).set_value("");
            comboBox.get_items().getItem(0).select();
            comboBox.commitChanges();
            comboBox.hideDropDown();
            $find("<%= ajaxManager.ClientID %>").ajaxRequest("<%=_REQ_REBIND_ACCOUNTNO%>");

        }
        function noneItemClickPro() {
            var comboBox = $find("<%=cboProChart.ClientID %>");
            comboBox.trackChanges();
            comboBox.get_items().getItem(0).set_text("");
            comboBox.get_items().getItem(0).set_value("");
            comboBox.get_items().getItem(0).select();
            comboBox.commitChanges();
            comboBox.hideDropDown();
            $find("<%= ajaxManager.ClientID %>").ajaxRequest("<%=_REQ_REBIND_ACCOUNTNO%>");

        }

        function KeypreessEnter(sender, event) {
            var keyPressed;
            if (window.event)
                keyPressed = window.event.keyCode; // IE
            else
                keyPressed = event.which; // Firefox
            if (keyPressed == 13) {
                var btnsearch = new ControlFinder().getControlByCssClass("btnFind"); //Chỉ sử dụng được khi CSS class cua button Search la btnFind
                if (btnsearch[0] != null)
                    btnsearch[0].focus();
                btnsearch[0].click();
            }
        }
    </script>
</telerik:RadCodeBlock>

